import { Controller, Get, Render, UseGuards, Request } from '@nestjs/common';
import { JwtHttpGuard } from './jwt-http.guard';

@Controller('demo-jwt')
export class DemoJwtController {
  @UseGuards(JwtHttpGuard)
  @Get()
  @Render('demo-jwt.html')
  async getDemoJwtPage(@Request() req) {
    // 如果通过了守卫，说明token有效
    return {};
  }
}